Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inclusion of natl_ocean diagnostic #489

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Taydra-Low
Copy link

Description
These changes are for the addition of the Subtropical to Subpolar North Atlantic Ocean Diagnostics (natl_ocean) POD into the MDTF-diagnostics. The natl_ocean POD is still under development and only contains water mass transformation as its diagnostic at the moment. Because the POD is still under development the checklist isn't going to be completed.

For the natl_ocean POD to run, ocean variables (TAREA, SALT, SHF, SFWF) were added to the fieldlist_NCAR. For this first draft, we used our own model input data (a CESM historical run) but plan to switch to the MDTF provided time series runs.

"TAREA": {
"standard_name": "area of T cells",
"modifier": "ocean_realm",
"units": "centimeters^2",
"ndim": 2
},
"SALT": {
"standard_name": "Salinity",
"units": "psu",
"ndim": 4
"SHF": {
"standard_name": "Surface Heat Flux",
"units": "watts m^-2",
"ndim": 3
},
"SFWF": {
"standard_name": "Surface Freshwater Flux",
"units": "kg/m2/s",
"ndim": 3

We tried to add nlat and nlon to the feildlist because but the MDTF framework is not set up to work with this dimensions so those are hard coded into the POD for the moment. We will need i, j dimensions for 2-d coordinate LAT/LON added to the MDTF software, but need help to get that addition correct.

The POD was added to the diagnostics directory and is located at:

diagnostics/natl_ocean

The POD includes
doc/wmt_dummy.rst - this file hasn't yet been filled out or modified for our specific POD
my_tests.jsonc - this was created so that we could avoid changing default_tests.jsonc
natl_ocean.html - this file has been changed slightly to align with our POD
natl_wmt.py - contains the code to calculate water mass transformation
natl_ocean.py - the driver script that calls natl_wmt.py, for testing purposes this script also includes calculating the time means of variables that are used in the POD
settings.jsonc - changed to work with the POD

Below is a sample plot of the wmt diagnostic
example_model_WMT_plot

How Has This Been Tested?
The POD was run on a Linux system using python version 3.10 using the default MDTF env and the expected wallclock time is <1 minute

Checklist:

  • My branch is up-to-date with the NOAA-GFDL main branch, and all merge conflicts are resolved
  • The scripts are written in Python 3.10 or above (preferred; required if funded by a CPO grant), NCL, or R
  • All of my scripts are in the diagnostics/[POD short name] subdirectory, and include a main_driver script, template html, and settings.jsonc file
  • I have made corresponding changes to the documentation in the POD's doc/ subdirectory
  • I have requested that the framework developers add packages required by my POD to the python3, NCL, or R environment yaml file if necessary, and my environment builds with conda_env_setup.sh
  • I have added any necessary data to input_data/obs_data/[pod short name] and/or input_data/model/[pod short name]
  • My code is portable; it uses MDTF environment variables, and does not contain hard-coded file or directory paths
  • I have provided the code to generate digested data files from raw data files
  • Each digested data file generated by the script contains numerical data (no figures), and is 3 GB or less in size
  • I have included copies of the figures generated by the POD in the pull request
  • The repository contains no extra test scripts or data files

@Taydra-Low Taydra-Low marked this pull request as ready for review October 25, 2023 23:27
@wrongkindofdoctor wrongkindofdoctor self-assigned this Oct 26, 2023
@wrongkindofdoctor wrongkindofdoctor added the diagnostic Issue pertains to a contributed diagnostic label Oct 26, 2023
# settings.jsonc file.
import xarray as xr # python library we use to read netcdf files
import matplotlib.pyplot as plt # python library we use to make plots
import xwmt

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'xwmt' is not used.
# Commands to load third-party libraries. Any code you don't include that's
# not part of your language's standard library should be listed in the
# settings.jsonc file.
import xarray as xr # python library we use to read netcdf files

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'xr' is not used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostic Issue pertains to a contributed diagnostic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants